<style scoped>

.index-2::before{
  content: '';
  position: absolute;left: 0;top: 0;width: 100%;height: 100%;z-index: 2
}

.index-3::before{
  content: '';
  position: absolute;left: 0;top: 0;width: 100%;height: 100%;z-index: 3
}
.full{width: 100%;height: 100%;}

.box{position: relative;width: 100%;height: 100%;--index:1;}
.box::before{content: '';position: absolute;left: 0;top: 0;width: 100%;height: 100%;z-index: var(--index);}

</style>
<template>

  <div class="box" @click="changeImg">
    <img-referrer v-for="v in imageUrlList" :src="v" style="width: 50px" @click="changeImg"/>

    <h1>地方 {{config.config?.dd}}</h1>
    <h1>用户ID {{this_user.truename}}</h1>
    <div class="full" style="overflow: hidden;">
      <div class="full" style="position: relative">
        <div class="box" style="--index:3;"></div>
      </div>
    </div>
  </div>

<!--  <PageBlock v-for="row in pageBlockList" v-bind="row"></PageBlock>-->

  <router-link to="/index">index</router-link>
  header_slot.vue
  <div class="flex">
  </div>

  <van-field label="文件上传">
    <template #input>
      <s94_upload v-model="value_file" max="3" reupload ></s94_upload>
    </template>
  </van-field>

  <div style="height: 300vh;"></div>

</template>

<script>
import s94_upload from "@/components/widget/s94_upload.vue";
import PageBlock from "@/components/auto_import/PageBlock.vue";
import ImgReferrer from "@/components/widget/ImgReferrer.vue";
import {use_config_map} from "@/store/config_map.js";
import {use_this_user} from "@/store/this_user.js";
import {alert, toast} from "@/js/vant_tool.js";


let pageBlockList = [];

export default {
  components: {ImgReferrer, PageBlock, s94_upload},
  data: function () {
    let img = 'http://mmbiz.qpic.cn/mmbiz_jpg/Gt1ibmdWFkeoMfTz89H2C8hJlPtuTaek2lGY72u5hJ4Wc5feCC92MnGwWrudzibpjia3Jl8rGliaspiaPlKsYrJcwOw/0.jpg?from=appmsg';
    let img2 = '//yxsh.taiyusaas.com/uniapp/mall_template/static/img/bg.d24334fd.jpg';
    let pdf = '//taiyushangdao-saas.oss-cn-chengdu.aliyuncs.com/uploads/2025/0425/114151017560.pdf';


    return {
      value_file: `${img},${img2},${pdf}`,
      category_list: [],

      config: use_config_map().config,
      this_user: use_this_user(),

      pageBlockList,

      imageUrlList: [
        'https://s94-cd.oss-cn-chengdu.aliyuncs.com/uploads/2024/1216/094105864711.png'
      ],
      imageUrlIndex: 0,
    }
  },
  methods:{
    changeImg(){
      console.log('changeImg')
      let list = [
        'https://s94-cd.oss-cn-chengdu.aliyuncs.com/uploads/2024/1216/094105864711.png',
        '//mmbiz.qpic.cn/mmbiz_jpg/Gt1ibmdWFkeoMfTz89H2C8hJlPtuTaek2lGY72u5hJ4Wc5feCC92MnGwWrudzibpjia3Jl8rGliaspiaPlKsYrJcwOw/0.jpg?from=appmsg',
      ]
      this.imageUrlIndex++;
      let src = list[this.imageUrlIndex%2];
      this.imageUrlList = [src]
    },
    getReferrerPolicy(url) {
      return ~url.indexOf('mmbiz.qpic.cn/') ?  'no-referrer' : null;
    },
    onscroll(e){
      console.log(e.target.scrollTop, window.pageYOffset , );
    }
  },
  computed:{},
  mounted(){


    let arr = ['c', 'a', 'b'];
    let obj = {}
    arr.forEach(k=>{
      obj[k] = 1
    })
    obj = JSON.parse('{"c": 1, "a": 1, "b": 1}')
    console.log(obj);
    Object.keys(obj).forEach(k=>{
      console.log(k, obj[k]);
    })
    for (const k in obj) {
      console.log(k, obj[k]);
    }

    setTimeout(()=>{
      // select_date('Y-M-D', '2025-03-02').then((v)=>{
      //   console.log(v);
      // })


      // router.push('/model_base/edit?model_name=account_book&action=add')
      // let href = 'http://localhost:5173/#/model_base/edit?model_name=account_book&action=add';
      // router.push(href);
      // /model_base/edit?model_name=account_book&action=add
      // href_handle('http://localhost:5173/#/model_base/edit?model_name=account_book&action=add');
      console.log('ddd')
      // tool.loading()
    }, 2000);

  }
}
</script>